%{--
This file is part of dbdjasperreport.

Copyright (C) 2008 Kue Vang aka Kou
Licensed under the Eclipse Public License, Version 1.0; 
you may not use this file except in compliance with the License. 
You may obtain a copy of the License at http://www.eclipse.org/legal/epl-v10.html 
Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS, 
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions and limitations 
under the License.
--}%

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Parameter List</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
            <span class="menuButton"><g:link class="create" action="create">New Parameter</g:link></span>
        </div>
        <div class="body">
            <h1>Parameter List</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table>
                    <thead>
                        <tr>
                        
                   	        <g:sortableColumn property="id" title="Id" />
                        
                   	        <th>Report</th>
                   	    
                   	        <g:sortableColumn property="dataType" title="Data Type" />
                        
                   	        <g:sortableColumn property="defaultOperator" title="Default Operator" />
                        
                   	        <g:sortableColumn property="parameterDisplayName" title="Parameter Display Name" />
                        
                   	        <g:sortableColumn property="parameterName" title="Parameter Name" />
							<g:sortableColumn property="parameterValue" title="Parameter Value" />
							<g:sortableColumn property="parameterFilterable" title="Parameter Filterable" />
							<g:sortableColumn property="comments" title="Comments" />
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${reportParameterList}" status="i" var="reportParameter">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                        
                            <td><g:link action="show" id="${reportParameter.id}">${reportParameter.id?.encodeAsHTML()}</g:link></td>
                        
                            <td>${reportParameter.report?.encodeAsHTML()}</td>
                        
                            <td><g:displayDataType value="${reportParameter?.dataType}"/></td>
                        
                            <td><g:displayOperator value="${reportParameter?.defaultOperator}"/></td>
                        
                            <td>${reportParameter.parameterDisplayName?.encodeAsHTML()}</td>
                        
                            <td>${reportParameter.parameterName?.encodeAsHTML()}</td>		
							<td>${reportParameter.parameterValue?.encodeAsHTML()}</td>	
							
							<td>${reportParameter.parameterFilterable?.encodeAsHTML()}</td>
							<td>${reportParameter.comments?.encodeAsHTML()}</td>
                        
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${ReportParameter.count()}" />
            </div>
        </div>
    </body>
</html>
